import fetch from 'node-fetch';

const problemId = process.argv.slice(2).join('');

const fetchTitleSlug = async (problemId: string) => {
	fetch('https://leetcode.cn/graphql/', {
		headers: {
			'content-type': 'application/json',
		},
		body: '{"query":"\\n    query questionTitle($titleSlug: String!) {\\n  question(titleSlug: $titleSlug) {\\n    questionId\\n    questionFrontendId\\n    title\\n    titleSlug\\n    isPaidOnly\\n    difficulty\\n    likes\\n    dislikes\\n  }\\n}\\n    ","variables":{"titleSlug":"trapping-rain-water"},"operationName":"questionTitle"}',
		method: 'POST',
	});
};

const fetchProblem = async (problemId: string) => {
	const result = await fetch('https://leetcode.cn/graphql/', {
		headers: {
			'content-type': 'application/json',
		},
		body: '{"query":"\\n    query questionTranslations($titleSlug: String!) {\\n  question(titleSlug: $titleSlug) {\\n    translatedTitle\\n    translatedContent\\n  }\\n}\\n    ","variables":{"titleSlug":"trapping-rain-water"},"operationName":"questionTranslations"}',
		method: 'POST',
	}).then((res) => res.json());

	console.log(result);
};

const main = async () => {};
